package com.bustle.order.dto.account;

import javax.ejb.EJB;
import javax.ejb.Local;
import javax.ejb.Stateless;

import com.bustle.commons.Mapper;

@Local
public interface AccountDtoMapper extends Mapper<AccountDto, AccountDto>
{
  @Stateless
  static public class DefaultAccountDtoMapper implements AccountDtoMapper
  {
    @Override
    public AccountDto map(AccountDto aSource, AccountDto aDestination)
    {
      return dataToDtoMapConverter.map(dtoToDataMapConverter.convert(aSource), aDestination);
    }

    @EJB
    protected DtoToAccountMapConverter dtoToDataMapConverter;
    @EJB
    protected AccountToDtoMapConverter dataToDtoMapConverter;
  }
}
